package org.dromara.system.service;

import org.dromara.system.domain.SysMember;
import org.dromara.system.domain.vo.SysMemberVo;
import org.dromara.system.domain.bo.SysMemberBo;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.mybatis.core.page.PageQuery;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import java.util.Collection;
import java.util.List;
import java.util.function.Function;

/**
 * 微信用户Service接口
 *
 * @author yilong.fu
 * @date 2024-09-14
 */
public interface ISysMemberService {


    SysMemberVo selectByOpenId(String openId);
    /**
     * 查询微信用户
     */
    SysMemberVo getOne(SysMemberBo bo);

    SysMemberVo getOne(QueryWrapper<SysMember> wrapper);

    Long count(QueryWrapper<SysMember> wrapper);


    /**
    * 查询微信用户
    */
        SysMemberVo getOne(SysMemberBo bo, Function<LambdaQueryWrapper<SysMember>, Boolean>
        func);

    /**
     * 查询微信用户
     */
    SysMemberVo queryById(Long memberId);

    /**
     * 查询微信用户列表
     */
    TableDataInfo<SysMemberVo> queryPageList(SysMemberBo bo, PageQuery pageQuery);

    /**
   * 查询微信用户列表
   */
    TableDataInfo<SysMemberVo> queryPageList(SysMemberBo bo, PageQuery pageQuery,
                                                  Function<LambdaQueryWrapper<SysMember>, Boolean>
                                                      func);

    /**
     * 查询微信用户列表
     */
    List<SysMemberVo> queryList(SysMemberBo bo);

    /**
     * 查询微信用户列表
     */
    List<SysMemberVo> queryList(SysMemberBo bo,
                                     Function<LambdaQueryWrapper<SysMember>, Boolean>
                                         func);

    /**
     * 新增微信用户
     */
    Boolean insertByBo(SysMemberBo bo);

    /**
     * 修改微信用户
     */
    Boolean updateByBo(SysMemberBo bo);

    /**
     * 校验并删除微信用户信息
     */
    Boolean deleteWithValidById(Long id, Boolean isValid);
    /**
     * 校验并批量删除微信用户信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);


    /**
     * 刷新微信公众ID
     */
    public void updateMpOpenIdToMember();
}
